<?php

defined('_JEXEC') or die();

jimport('joomla.application.component.controller');

class Easiv2adminControllerXmlrpcTest extends JController {

	function display() {

		JRequest::setVar('view', 'splash');
		echo "XMLRPC CLIENT";

		parent::display();
	}

	function getRemoteInformation() {
		
		$request_method = 'manageExtensions.getInstalledExtensions';

		$opts = array('http' =>	array(
	        'method'  => 'POST',
	        'header'  => 'Content-type: text/html',
			)
		);

		$context  = stream_context_create($opts);
		
		$response = file_get_contents("http://localhost/Joomla1.6RegularInstance/index.php?option=com_easiv2&task=".$request_method."&format=xmlrpc", false, $context);
		
		echo "The remote Joomla! Version is<br/><blockquote>".print_r(xmlrpc_decode($response))."</blockquote>";
	}

}